<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Whisper: adv_amplitude_scrambling.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Whisper
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">adv_amplitude_scrambling.h</div>  </div>
</div>
<div class="contents">
<a href="adv__amplitude__scrambling_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * amplitude_scrambling.h</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> *  Created on: Apr 12, 2011</span>
<a name="l00005"></a>00005 <span class="comment"> *      Author: Paul Woelfel</span>
<a name="l00006"></a>00006 <span class="comment"> */</span>
<a name="l00007"></a>00007 
<a name="l00008"></a>00008 <span class="preprocessor">#ifndef ADV_AMPLITUDE_SCRAMBLING_H_</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span><span class="preprocessor">#define ADV_AMPLITUDE_SCRAMBLING_H_</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span>
<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;fftw3.h&gt;</span>
<a name="l00012"></a>00012 <span class="preprocessor">#include &quot;<a class="code" href="crypto__engine_8h.html">crypto_engine.h</a>&quot;</span>
<a name="l00013"></a>00013 <span class="preprocessor">#include &quot;<a class="code" href="buffer_8h.html">buffer.h</a>&quot;</span>
<a name="l00014"></a>00014 
<a name="l00018"></a><a class="code" href="classCAdvAmplitudeScrambling.html">00018</a> <span class="keyword">class </span><a class="code" href="classCAdvAmplitudeScrambling.html">CAdvAmplitudeScrambling</a>: <span class="keyword">public</span> <a class="code" href="classCCryptoEngine.html" title="Implementation of a crypto engine.">CCryptoEngine</a> {
<a name="l00019"></a>00019 <span class="keyword">public</span>:
<a name="l00020"></a>00020         <a class="code" href="classCAdvAmplitudeScrambling.html#a6cc78a80ce19d67166b11b4635f57785">CAdvAmplitudeScrambling</a>(<a class="code" href="structNAudioFormats_1_1SStreamInfo.html">NAudioFormats::SStreamInfo</a> ioStreamInfo);
<a name="l00021"></a>00021 
<a name="l00022"></a>00022         <span class="keyword">virtual</span> <a class="code" href="classCAdvAmplitudeScrambling.html#a73eedda4c16cbf0f40e93d6eb93d3923">~CAdvAmplitudeScrambling</a>();
<a name="l00023"></a>00023 
<a name="l00034"></a>00034         <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classCAdvAmplitudeScrambling.html#a7d3feb940147fc32943f62fb85c6c6d1">encrypt</a>(<span class="keywordtype">double</span> *pData, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> pCount);
<a name="l00035"></a>00035 
<a name="l00046"></a>00046         <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classCAdvAmplitudeScrambling.html#aecd19de1a33c57aecb169850ccd0b2a7">decrypt</a>(<span class="keywordtype">double</span> *pData, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> pCount);
<a name="l00047"></a>00047 
<a name="l00048"></a>00048 <span class="keyword">protected</span>:
<a name="l00056"></a>00056         <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classCAdvAmplitudeScrambling.html#a3c8ebe9537d5b48b8fc84c9b7730e851">changeSettings</a>();
<a name="l00057"></a>00057 
<a name="l00062"></a>00062         <span class="keywordtype">int</span> <a class="code" href="classCAdvAmplitudeScrambling.html#ad564cabd55dd9b1be27bbfa70a4c0721">dencrypt</a>(<span class="keywordtype">double</span> * pData, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> pCount, <span class="keywordtype">bool</span> encrypt);
<a name="l00063"></a>00063 
<a name="l00069"></a>00069         <span class="keywordtype">int</span> <a class="code" href="classCAdvAmplitudeScrambling.html#af7d185cf5ebd0aecb6785cdb53838657">generateKeySignal</a>();
<a name="l00070"></a>00070 
<a name="l00071"></a>00071         <span class="keywordtype">void</span> <a class="code" href="classCAdvAmplitudeScrambling.html#a2866dfcf4cafb68513d13a0567e9ad15">normalizeKeySignal</a>();
<a name="l00072"></a>00072 
<a name="l00076"></a><a class="code" href="classCAdvAmplitudeScrambling.html#aac071eebe90d1abb0bf38b46372fd8be">00076</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classCAdvAmplitudeScrambling.html#aac071eebe90d1abb0bf38b46372fd8be">mKeySignalLength</a>;
<a name="l00077"></a>00077 
<a name="l00081"></a><a class="code" href="classCAdvAmplitudeScrambling.html#aa26607118fd8dee67e23d88fbf587b63">00081</a>         <span class="keywordtype">double</span> <a class="code" href="classCAdvAmplitudeScrambling.html#aa26607118fd8dee67e23d88fbf587b63">mKeySignalRepetition</a>;
<a name="l00082"></a>00082 
<a name="l00086"></a><a class="code" href="classCAdvAmplitudeScrambling.html#ae3338dc0c59b896ae2265133ac5a00ae">00086</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classCAdvAmplitudeScrambling.html#ae3338dc0c59b896ae2265133ac5a00ae">mKeySignalValuesLeft</a>;
<a name="l00087"></a>00087 
<a name="l00091"></a><a class="code" href="classCAdvAmplitudeScrambling.html#a7570533f56e7ce0e7458d69cca90529b">00091</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classCAdvAmplitudeScrambling.html#a7570533f56e7ce0e7458d69cca90529b">mKeySignalPos</a>;
<a name="l00092"></a>00092 
<a name="l00096"></a><a class="code" href="classCAdvAmplitudeScrambling.html#acb4d80c7050c3f5ee545f66f47725e60">00096</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classCAdvAmplitudeScrambling.html#acb4d80c7050c3f5ee545f66f47725e60">mKeySignalFourierWaveCount</a>;
<a name="l00097"></a>00097 
<a name="l00101"></a><a class="code" href="classCAdvAmplitudeScrambling.html#a375fd7d472cfc5e5d7a6a0f4b0837d4a">00101</a>         <span class="keywordtype">bool</span> <a class="code" href="classCAdvAmplitudeScrambling.html#a375fd7d472cfc5e5d7a6a0f4b0837d4a">mKeySignalMirrorFrequencies</a>;
<a name="l00102"></a>00102 
<a name="l00107"></a><a class="code" href="classCAdvAmplitudeScrambling.html#ac742b2cc4bdebd8a339fc156c5916941">00107</a>         <span class="keywordtype">double</span> <a class="code" href="classCAdvAmplitudeScrambling.html#ac742b2cc4bdebd8a339fc156c5916941">mKeySignalScale</a>;
<a name="l00108"></a>00108 
<a name="l00112"></a><a class="code" href="classCAdvAmplitudeScrambling.html#a15c7bd96e724736bed42c2379c1e0403">00112</a>         <span class="keywordtype">double</span> <a class="code" href="classCAdvAmplitudeScrambling.html#a15c7bd96e724736bed42c2379c1e0403">mKeySignalFactor</a>,<a class="code" href="classCAdvAmplitudeScrambling.html#ab1f16b5f2a6d08a6f62375a0b15e867b">mDataSignalFactor</a>;
<a name="l00113"></a>00113 
<a name="l00114"></a>00114 
<a name="l00115"></a>00115 
<a name="l00116"></a><a class="code" href="classCAdvAmplitudeScrambling.html#a64db78f1dd845a4b56fb4ff276b16142">00116</a>         <span class="keywordtype">int</span> <a class="code" href="classCAdvAmplitudeScrambling.html#a64db78f1dd845a4b56fb4ff276b16142">mTotalSampleCount</a>;
<a name="l00117"></a>00117 
<a name="l00118"></a>00118         <span class="comment">/*</span>
<a name="l00119"></a>00119 <span class="comment">         * use only speech frequencies for the generated signal</span>
<a name="l00120"></a>00120 <span class="comment">         */</span>
<a name="l00121"></a><a class="code" href="classCAdvAmplitudeScrambling.html#a8266656fd399a7f9a431a2e23d928147">00121</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classCAdvAmplitudeScrambling.html#a8266656fd399a7f9a431a2e23d928147">mKeySignalSpeechOnly</a>, <a class="code" href="classCAdvAmplitudeScrambling.html#aabfe9d508969de0103ff2083ad222421">mKeySignalSpeechFreqStart</a>, <a class="code" href="classCAdvAmplitudeScrambling.html#a61c5903991eeb687a47bd953ee25d791">mKeySignalSpeechFreqStop</a>;
<a name="l00122"></a>00122 
<a name="l00126"></a><a class="code" href="classCAdvAmplitudeScrambling.html#af7d67a1a3336d7ec3c1ad7069282123c">00126</a>         fftw_complex *<a class="code" href="classCAdvAmplitudeScrambling.html#af7d67a1a3336d7ec3c1ad7069282123c">mFftData</a>;
<a name="l00127"></a>00127 
<a name="l00128"></a>00128 
<a name="l00129"></a>00129 <span class="keyword">private</span>:
<a name="l00130"></a><a class="code" href="classCAdvAmplitudeScrambling.html#a99fd7f064206449f6fefe70503d330fc">00130</a>         <span class="keyword">static</span> <span class="keyword">const</span> std::string <a class="code" href="classCAdvAmplitudeScrambling.html#a99fd7f064206449f6fefe70503d330fc">sIniSectionName</a>;
<a name="l00131"></a>00131 
<a name="l00132"></a>00132 
<a name="l00133"></a>00133 };
<a name="l00134"></a>00134 
<a name="l00135"></a>00135 <span class="preprocessor">#endif </span><span class="comment">/* ADV_AMPLITUDE_SCRAMBLING_H_ */</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Wed Jan 25 2012 22:00:39 for Whisper by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
